import django
import os
import logging

os.environ['DJANGO_SETTINGS_MODULE'] = 'myfirstproj.settings'
django.setup()


def logdemo():
    # 得到配置的实例
    logger = logging.getLogger('django')
    logger.info('我是 info log')
    logger.info('我是lc info log')
    logger.warning('我是lc info log')
    logger.warning('我是 info log')
    logger.error('我是lc  error info log')
    logger.error('我是  error info log')


if __name__ == '__main__':
    logdemo()
